<?php
/**
 * Description of CmsController
 *
 * @author FFOZEU
 */

namespace Applications\Modules\Cms\Frontend\Controller;

if( !defined('IN') ) die('Hacking Attempt');

use Library\BackController;
use Library\HttpRequest;

class CmsController extends BackController{
    
    public function executeShow(HttpRequest $request){
        // On ajoute une définition pour le titre
        //$this->page->addVar('title', 'Liste des 5 dernières news');
		$manager = $this->managers->getManagerOf('Cms');
        if ($request->getExists('id')) {
            $cms = $manager->getCmsById($request->getData('id'));
        
            $this->page->addVar('cms', $cms);
            if(!empty ($cms))
                $this->page->addVar('title', $cms->getTitre());
        }
        
    }
}

?>
